//
// Created by liushuai on 2020/3/30.
//
#include "climbStairs.h"
int climbStairs(unsigned int n) {
    int lower = 2;
    int upper = 3;
    int result = 0;
    if(n==0)
        result = 0;
    else if(n>0&&n<=3)
        result = n;
    else{
        while (n>3)
        {
            result = upper+lower;
            lower = upper;
            upper = result;
            n--;
        }
   
        
    }
         return result;
}